﻿#region

using HouseHoldBudget.App_GlobalResources;

#endregion

namespace HouseHoldBudget.Infrastructure
{
    public class LocalizationService : ILocalizationService
    {
        #region ILocalizationService Members

        /// <summary>
        ///   Gets the resource.
        /// </summary>
        /// <param name="resourceKey"> The resource key. </param>
        /// <returns> </returns>
        public string GetResource(string resourceKey)
        {
            string value = CustomResources.ResourceManager.GetString(resourceKey);
            if (string.IsNullOrEmpty(value))
            {
                value = "[Missing Resource]: " + resourceKey;
            }
            return value;
        }

        #endregion
    }
}